#ifndef _LIBMSG_H_
#define _LIBMSG_H_

#include "Eina.h"

typedef struct _Libmsg_Subject
{
	Eina_Hash *observers;
} Libmsg_Subject;

typedef void (*Libmsg_Observer)(Libmsg_Subject *s, const char *event_name,
		void *event_data, void *data);

void libmsg_init(void);
void libmsg_shutdown(void);

void libmsg_subject_setup(Libmsg_Subject *s);
void libmsg_subject_observer_add(Libmsg_Subject *s, const char *event_name,
	Libmsg_Observer o, void *data);
void libmsg_subject_observer_remove(Libmsg_Subject *s, const char *name, Libmsg_Observer o);
void libmsg_subject_notify(Libmsg_Subject *s, const char *event_name, void *event_data);

#endif
